package com.Hsu.blog.mapper;

import com.Hsu.blog.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @author Hsu琛君珩
 * @ClassName:UserInfoMapper
 * @date 2024-01-23
 * @apiNote
 * @Version: v1.0
 */

@Mapper
public interface UserInfoMapper {
    //根据用户名，查询用户信息
    @Select("select * from user where user_name=#{userName} and delete_flag=0")
    UserInfo queryByName(String userName);

    @Select("select * from user where id=#{id} and delete_flag=0")
    //根据用户ID，查询用户信息
    UserInfo queryById(Integer id);
}
